<template>
  <div class="area_list">
    <div class="area_item" v-for="(item, index) in pvList" :key="index">
      <div class="area_item_box">
        <img
          src="@/assets/images/applicationCenter/item_bg.jpeg"
          class="item_bg"
          alt=""
        />
        <div class="title">{{ item.areaName }}</div>
        <div class="number_val_box_list">
          <div class="number_val_box" v-for="it in item.list" :key="it.name">
            <div class="item_title">
              <div class="item_val number">
                {{ it.val }}
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      pvList: [
        {
          areaName: "设定温度",
          list: [
            {
              state: true,
              name: "PV",
              val: "950℃",
            },
          ],
        },
        {
          areaName: "当前温度",
          list: [
            {
              name: "PV",
              val: "952℃",
            },
          ],
        },
        {
          areaName: "真空度",
          list: [
            {
              name: "PV",
              val: "0mPA",
            },
          ],
        },
      ],
    };
  },
};
</script>

<style lang='scss' scoped>
/* 定义 */
@font-face {
  font-family: "digital-7";
  src: url("./ds_digital/DS-DIGIB.woff") format("woff");
}
//使用
.number {
  display: inline-block;
  font-family: "digital-7";
}
.area_list {
  display: flex;
  justify-content: space-between;
  height: 38%;
  .area_item {
    position: relative;
    .item_bg {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
    width: 32%;
    padding: 16px;
    padding-bottom: 0;
    padding-top: 10px;
    /* background-size: contain; */
    .area_item_box {
      z-index: 999;
      height: 100%;
    }
    .number_val_box_list {
      width: 80%;
      position: absolute;
      left: 50%;

      top: 60%;
      transform: translate(-50%, -50%);

      flex-direction: column;
      display: flex;
      align-content: center;
      justify-content: space-between;
      height: 64%;
      padding: 3px 0;
    }
    .number_val_box {
      width: 100%;
      background-color: #0a226c;
      height: 100%;
      /* margin-bottom: 6px; */

      /* padding: 4px 0;
      &:last-child {
        margin-bottom: 0;
        padding: 0;
      }
      &:first-child {
        margin-bottom: 0;
        padding: 0;
      } */
      .item_title {
        width: 100%;
        display: flex;
        align-content: center;
        justify-content: space-between;
        height: 100%;

        /* line-height: 22px; */

        .item_val {
          display: flex;
          align-items: center;
          justify-content: center;
          height: 100%;
          color: rgb(245, 108, 108);
          width: 100%;
          /* height: 22px; */
          font-size: 34px;
          font-weight: bold;
        }
        .item_num {
          font-size: 15px;
          width: 23px;
          min-width: 23px;
          height: 30%;
        }
        .state_number {
          background: rgba($color: #600001, $alpha: 0.6);
          color: #ff4d4f;
        }
      }
    }
    .title {
      position: absolute;
      top: 10px;
      left: 8px;
      font-size: 16px;
      /* margin-bottom: 6px; */
    }
  }
}
</style>